package com.bwda.dsrs.systemservice.util;


import org.springframework.security.authentication.encoding.Md5PasswordEncoder;

/**
 * 密码加密 配合Spring Security
 * 
 * @author 孙文 2011-05-19
 * 
 */
public class EncriptUtil {
    
    /**
     * 加密密码 MD5
     * 
     * @param pwd 待加密密码
     * @return String 加密过的密码
     */
    public static String encodePwd(String pwd) {
        Md5PasswordEncoder encoder = new Md5PasswordEncoder();
        return encoder.encodePassword(pwd, null);
    }

    public static void main(String[] args){
        System.out.println(encodePwd("mabaowenmcafee123!@#+!s7X"));
    }
}
